const state = {
  routerInfo: {}
}

const mutations = {
  SET_ROUTERINFO: (state, routerInfo) => {
    state.routerInfo = routerInfo
  }
}

const actions = {
  setRouterInfo({ commit }, routerInfo) {
    return new Promise(resolve => {
      commit('SET_ROUTERINFO', routerInfo)
      resolve()
    })
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
